package com.tablepet.activities.main;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListAdapter;

import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment;

import com.tablepet.adapter.BidAdapter;
import com.tablepet.bean.BidBean;
import com.tablepet.databinding.FragmentBidBinding;

import java.util.ArrayList;
import java.util.List;

public class BidFragment extends Fragment {
    private FragmentBidBinding binding;
    private BidAdapter adp;
    private List<BidBean> data=new ArrayList<>();

    public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        binding = FragmentBidBinding.inflate(inflater, container, false);





        adp=new BidAdapter(requireActivity(),data);
        binding.bidGrid.setAdapter(adp);
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());
        data.add(new BidBean());




        return binding.getRoot();
    }
    @Override
    public void onDestroyView() {
        super.onDestroyView();
        binding = null;
    }
}